import Vue from 'vue'

import Cookies from 'js-cookie'

import 'normalize.css/normalize.css' // a modern alternative to CSS resets

import Element from 'element-ui'
import './styles/element-variables.scss'
// import enLang from 'element-ui/lib/locale/lang/en'// 如果使用中文语言包请默认支持，无需额外引入，请删除该依赖

import '@/styles/index.scss' // global css
import '@/styles/common.scss' // common css
import '@/styles/quick.scss'
import '@/styles/font.scss'

// 引入$bus传递参数
import VueBus from 'vue-bus';
Vue.use(VueBus);

// 引入复制粘贴功能
import Clipboard from 'clipboard'; 
Vue.prototype.Clipboard=Clipboard;


import App from './App'
import store from './store'
import router from './router'

import './icons' // icon
import './permission' // permission control
import '@/assets/icon/iconfont.css'
// 数据字典
import dict from './components/Dict'

import * as filters from './filters' // global filters

import PhoneScript from "@/utils/webSocket/PhoneScript.js";
Vue.prototype.$PhoneScript = PhoneScript;

// 表格树
// var ElTreeGrid = require('element-tree-grid');
// Vue.component(ElTreeGrid.name, ElTreeGrid);

import '@/directive/preventDbClick.js'

// 代码高亮
// import VueHighlightJS from 'vue-highlightjs'
// import 'highlight.js/styles/atom-one-dark.css'

/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
 * you can execute: mockXHR()
 *
 * Currently MockJs will be used in the production environment,
 * please remove it before going online ! ! !
 */
// if (process.env.NODE_ENV === 'production') {
//   const { mockXHR } = require('../mock')
//   mockXHR()
// }

Vue.use(Element, {
    size: Cookies.get('size') || 'mini' // set element-ui default size
        // locale: enLang // 如果使用中文，无需设置，请删除
})
Vue.use(dict)
    // Vue.use(VueHighlightJS)

// register global utility filters
Object.keys(filters).forEach(key => {
    Vue.filter(key, filters[key])
})

// 引入百度地图api
import BaiduMap from 'vue-baidu-map';
Vue.use(BaiduMap, {
    /* Visit http://lbsyun.baidu.com/apiconsole/key for details about app key. */
    ak: 'dygw6BRv5o8pw8GZVlH0HurVmudGaTxN'
})

Vue.config.productionTip = false

new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
})